-- GENERATED SPELL FOR [Erekem Guard] --


function spell0_29395(pUnit, Event) --@Gushing Wound,n/a--
pUnit:FullCastSpellOnTarget(39215,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29395', 25000, 1)
end

function spell1_29395(pUnit, Event) --@Howling Screech,Self--
pUnit:FullCastSpellOnTarget(54462,pUnit)
pUnit:RegisterEvent('Sorts_29395', 6303, 1)
end

function spell2_29395(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(14516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29395', 604, 1)
end

function Sorts_29395(pUnit, Event)
local choix_sorts_29395 = math.random(0, 2)
if choix_sorts_29395 == 0 then
pUnit:RegisterEvent('spell0_29395', 1, 1)
end
if choix_sorts_29395 == 1 then
pUnit:RegisterEvent('spell1_29395', 1, 1)
end
if choix_sorts_29395 == 2 then
pUnit:RegisterEvent('spell2_29395', 1, 1)
end
end

function mob29395_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29395', math.random(1500, 3000), 1)
end

function mob29395_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29395_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29395_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29395, 1, 'mob29395_Action')
RegisterUnitEvent(29395, 2, 'mob29395_Leave')
RegisterUnitEvent(29395, 3, 'mob29395_Kill')
RegisterUnitEvent(29395, 4, 'mob29395_Die')
